<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>收支记录管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/jiujiu/jiuBalancePaymentsLog/">收支记录列表</a></li>
		<shiro:hasPermission name="jiujiu:jiuBalancePaymentsLog:edit"><li><a href="${ctx}/jiujiu/jiuBalancePaymentsLog/form">收支记录添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="jiuBalancePaymentsLog" action="${ctx}/jiujiu/jiuBalancePaymentsLog/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<label>名称 ：</label><form:input path="name" htmlEscape="false" maxlength="50" class="input-medium"/>
		&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
	</form:form>
	<tags:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered ">
		<thead><tr>
		<th>id</th>
		<th>门店名称</th>
		<th>类型</th>
		<th>积分</th>
		<th>当前积分</th>
		<th>创建时间</th>
		<th>操作</th></tr></thead>
		<tbody>
		<c:forEach items="${bpLogList}" var="bpLog">
			<tr>
				<td>${bpLog.id}</td>
				<td>${bpLog.storeName}</td>
				
					<c:choose>
					    <c:when test="${bpLog.type eq 1}">
					      	<td> 充值</td>
					      	<td>+${bpLog.point}</td>
					    </c:when>
					     <c:when test="${jiuBalancePaymentsLog.type eq 2}">
					       <td>	撤单</td>
					       <td>+${bpLog.point}</td>
					    </c:when>
					     <c:when test="${bpLog.type eq 3}">
					      	<td> 结算</td>
					      	<td>+${bpLog.point}</td>
					    </c:when>
					     <c:when test="${bpLog.type eq 4}">
					       <td>	下单</td>
					       <td>-${bpLog.point}</td>
					    </c:when>
					     <c:when test="${bpLog.type eq 5}">
					      	 <td> 提现</td>
					      	 <td>-${bpLog.point}</td>
					    </c:when>
					     <c:when test="${bpLog.type eq 6}">
					     	<td> 反审</td>
					     	 <td>-${bpLog.point}</td>
					    </c:when>
					    <c:otherwise>
					    </c:otherwise>
					</c:choose>
					
				<th>${bpLog.nowPoint}</th>
				<td><fmt:formatDate value="${bpLog.createTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss" /> </td>
				<td>
    				<a class="btn btn-success" href="${ctx}/jiujiu/jiuBalancePaymentsLog?manufactorId=${bpLog.manufactorId}&storeId=${bpLog.storeId}">查看门店记录</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<%-- <div class="pagination">${page}</div> --%>
</body>
</html>
